/*
 *  global.h
 *  hamsBaseball
 *
 *  Created by 함동기 on 10. 5. 3..
 *  Copyright 2010 __MyCompanyName__. All rights reserved.
 *
 */

#define SCREEN_WIDTH			( m_windowSize.width )
#define SCREEN_HEIGHT			( m_windowSize.height )
#define CX						( m_windowSize.width/2 )
#define CY						( m_windowSize.height/2 )

#define MAX_FRAME_BALL			30
#define MAX_FRAME_HITTING_BALL  20
#define MAX_LEFT_CHANCE         4
#define EXTRA_FRAME				3
#define FOUL_BALL_ANGLE			450

#define BG_START_X				(CX)
#define BG_START_Y				( (m_DeviceKind == DEVICE_IPHONE)?(CY+145):CY )
#define BALL_START_X			(CX-42)
#define	BALL_START_Y			( (m_DeviceKind == DEVICE_IPHONE)?(CY+123):(CY-22) )
#define	BALL_SHADOW_START_Y		( (m_DeviceKind == DEVICE_IPHONE)?(CY+55):(CY-90) )
#define BAT_START_X				(CX-100)
#define BAT_START_Y				( (m_DeviceKind == DEVICE_IPHONE)?(CY-100):(CY-245) )

#define	HIT_TIMING_FAST			3
#define	HIT_TIMING_SLOW			-2

enum 
{
	DEVICE_IPHONE = 0,
	DEVICE_IPAD
};

typedef struct tagHitInfo
{
	int	hittingAngleH;						/// horizontal angle
	int	hittingAngleV;						/// vertical alble
	int	hittingDistance;				
	int	hittingType;	
	int blnHitTimingGood;
}HitInfo;

typedef struct tagGameInfo
{
	int nScore;
	int nLeftChance;
	int nBallCnt;
	int nRanking[5];
	int nComboCnt;
	
	int blnFastball;
	int blnCurveball;
	int blnSlider;
	int blnChangeup;
	
	int blnPracticeMode;
}GameInfo;
	

extern HitInfo hitInfo;
extern GameInfo gameInfo;

extern const int PATH_SLIDER[70];
extern const int PATH_SINKER[70];






